<p>条件表达式中语句要尽量简洁，以便提高可读性。</p>
<h2>不规范的代码示例</h2>

<pre>
if (booleanVariable == true) { /* ... */ }
if (booleanVariable != true) { /* ... */ }
if (booleanVariable || false) { /* ... */ }
doSomething(!false);

booleanVariable = condition ? true : exp;
booleanVariable = condition ? false : exp;
booleanVariable = condition ?  exp : true;
booleanVariable = condition ?  exp : false;
booleanVariable = condition ?  true : false;
</pre>
<h2>正确的解决方案</h2>

<pre>
if (booleanVariable) { /* ... */ }
if (!booleanVariable) { /* ... */ }
if (booleanVariable) { /* ... */ }
doSomething(true);

booleanVariable = condition || exp;
booleanVariable = !condition &amp;&amp; exp;
booleanVariable = !condition ||  exp;
booleanVariable = condition &amp;&amp; exp;
booleanVariable = condition;
</pre>

